
Vue.component2('a_1_0_1_3_0', {  
    template: `
        <div class="a_1_0_1_3_0_menu_bar" :key="refresh" :style="'width:'+data.width">
<div class="a_1_0_1_1_0_activity_item"><span class="icon iconfont icon-yonghu"></span> <!----></div>
        </div>
`,  
  data() {
      return {
        now_select:"-1",
        refresh:"1",/*用来刷新组件*/
        data:{
            width:"20%",
            menus: {

        },
        fast_menu:[],//存放menus ids的数组 ids被转为整数 按照sort顺序排列
        show_flag:{}
        }
         
      };
  },
  methods: {

  },
  mounted:function(){
    //调用此函数刷新整个组件
    _this.refresh_func=function(){
        //创建菜单目录 快速查找数组
        _this.data.fast_menu=(Object.keys(_this.data.menus).map(Number)).sort();
        //创建菜单目录的选项快速查找数组
        let menu_id=null;
        for (let i=0;i<_this.data.fast_menu.length;i++){
            menu_id=_this.data.fast_menu[i];
            _this.data.show_flag[menu_id]=false;
            _this.data.menus[menu_id].item_fast=(Object.keys(_this.data.menus[menu_id].item_dct).map(Number)).sort();
            _this.data.menus[menu_id].item_fast_length=_this.data.menus[menu_id].item_fast.length;
        }
        //更改key 从而刷新整个组件
        _this.refresh=_this.refresh=="2"?"1":"2";
        // console.log("刷新:",_this.refresh);
    }

  }
} 
);

